package com.yc.backoffice.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class LoginController {
    @RequestMapping("login")
    public  String login(String username, String password, HttpSession session){
        if("yc".equals(username)&&"123".equals(password)){
            session.setAttribute("user",username);
            return "main";
        }else{
            return "login";
        }
    }

}
